<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
		<title></title>
		<style>
		  .hammer{
		    width: 200px;
		    height: 200px;
		    background: #ccc;
		    margin: 200px auto;
		  }
		</style>
	</head>
	<body>
	  <div class="hammer">
	    
	  </div>
	  
	  <script src="js/hammer.js"></script>
	  
	  <script>
	    let scale=1,old_scale;
	    let dom =document.querySelector(".hammer");
	    let hammer = new Hammer(dom);
	    hammer.get('pinch').set({"enable":true});
	    hammer.on("pinchstart",e=>{
	      dom.innerHTML = `pinchstart:${scale}`
	      old_scale = scale;
	    });
	    hammer.on("pinchmove",e=>{
	      scale = old_scale * e.scale;
	      dom.innerHTML = `pinchmove:${e.scale.toFixed(1)}--${old_scale.toFixed(1)}--${scale}`
	      dom.style.transform = `scale(${scale})`
	    });
	    hammer.on("pinchend",e=>{
	    });
	   
	  </script>
	</body>
</html>
